-- ----------------------------
-- Table structure for base_sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `base_sys_menu`;
CREATE TABLE `base_sys_menu` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `createTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  `updateTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
  `parentId` bigint DEFAULT NULL COMMENT '父菜单ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单名称',
  `router` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '菜单地址',
  `perms` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '权限标识',
  `type` tinyint NOT NULL DEFAULT '0' COMMENT '类型 0-目录 1-菜单 2-按钮',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图标',
  `orderNum` int NOT NULL DEFAULT '0' COMMENT '排序',
  `viewPath` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '视图地址',
  `keepAlive` tinyint NOT NULL DEFAULT '1' COMMENT '路由缓存',
  `isShow` tinyint NOT NULL DEFAULT '1' COMMENT '是否显示',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `IDX_05e3d6a56604771a6da47ebf8e` (`createTime`) USING BTREE,
  KEY `IDX_d5203f18daaf7c3fe0ab34497f` (`updateTime`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=453 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of base_sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `base_sys_menu` VALUES (1, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', NULL, 'Dashboard', NULL, NULL, 0, 'House', 1, NULL, 1, 1);
INSERT INTO `base_sys_menu` VALUES (2, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 1, '主控台', '/dashboard/console', NULL, 1, 'Menu', 1, 'views/dashboard/console.vue', 1, 1);
INSERT INTO `base_sys_menu` VALUES (3, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 1, '监控台', '/dashboard/monitor', NULL, 1, 'UserFilled', 2, 'views/dashboard/monitor.vue', 1, 1);
INSERT INTO `base_sys_menu` VALUES (4, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 1, '工作台', '/dashboard/workplace', NULL, 1, 'StarFilled', 3, 'views/dashboard/workplace.vue', 1, 1);
INSERT INTO `base_sys_menu` VALUES (5, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', NULL, '系统管理', NULL, NULL, 0, 'Setting', 2, NULL, 1, 1);
INSERT INTO `base_sys_menu` VALUES (6, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 5, '菜单列表', '/system/menu', NULL, 1, 'Menu', 1, 'views/system/menu/index.vue', 1, 1);
INSERT INTO `base_sys_menu` VALUES (7, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 5, '用户列表', '/system/user', NULL, 1, 'UserFilled', 2, 'views/system/user/index.vue', 1, 1);
INSERT INTO `base_sys_menu` VALUES (8, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 5, '角色列表', '/system/role', NULL, 1, 'StarFilled', 3, 'views/system/role/index.vue', 1, 1);
INSERT INTO `base_sys_menu` VALUES (9, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 6, '新增', NULL, 'base:sys:menu:add', 2, NULL, 1, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (10, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 6, '删除', NULL, 'base:sys:menu:delete', 2, NULL, 2, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (11, '2023-04-26 22:46:59.754000', '2023-04-26 22:56:28.549542', 6, '编辑', NULL, 'base:sys:menu:info,base:sys:menu:update', 2, NULL, 3, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (12, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 6, '查询', NULL, 'base:sys:menu:page,base:sys:menu:list,base:sys:menu:info', 2, NULL, 4, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (13, '2023-04-26 22:46:59.754000', '2023-04-26 22:56:28.560250', 7, '新增', NULL, 'base:sys:user:add', 2, NULL, 1, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (14, '2023-04-26 22:46:59.754000', '2023-04-26 22:56:28.562308', 7, '删除', NULL, 'base:sys:user:delete', 2, NULL, 2, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (15, '2023-04-26 22:46:59.754000', '2023-04-26 22:56:28.564287', 7, '修改', NULL, 'base:sys:user:update', 2, NULL, 3, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (16, '2023-04-26 22:46:59.754000', '2023-04-26 22:56:28.566051', 7, '查询', NULL, 'base:sys:user:page,base:sys:user:list,base:sys:user:info', 2, NULL, 4, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (17, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 8, '新增', NULL, 'base:sys:role:add', 2, NULL, 1, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (18,'2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 8, '删除', NULL, 'base:sys:role:delete', 2, NULL, 2, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (19, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 8, '修改', NULL, 'base:sys:role:update', 2, NULL, 3, NULL, 0, 1);
INSERT INTO `base_sys_menu` VALUES (20, '2023-04-26 22:46:59.754000', '2023-04-26 22:47:11.516379', 8, '查询', NULL, 'base:sys:role:page,base:sys:role:list,base:sys:role:info', 2, NULL, 4, NULL, 0, 1);
COMMIT;

-- ----------------------------
-- Table structure for base_sys_role
-- ----------------------------
DROP TABLE IF EXISTS `base_sys_role`;
CREATE TABLE `base_sys_role` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `createTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  `updateTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
  `userId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户ID',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `label` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '角色标签',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  `menuIdList` json NOT NULL COMMENT '菜单权限',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `IDX_469d49a5998170e9550cf113da` (`name`) USING BTREE,
  UNIQUE KEY `IDX_f3f24fbbccf00192b076e549a7` (`label`) USING BTREE,
  KEY `IDX_6f01184441dec49207b41bfd92` (`createTime`) USING BTREE,
  KEY `IDX_d64ca209f3fc52128d9b20e97b` (`updateTime`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of base_sys_role
-- ----------------------------
BEGIN;
INSERT INTO `base_sys_role` VALUES (1, '2021-02-24 21:18:39.682358', '2021-02-24 21:18:39.682358', '1', '超管', 'admin', '最高权限的角色', 'null');
INSERT INTO `base_sys_role` VALUES (2, '2023-08-04 13:00:11.324000', '2023-08-04 13:00:11.324000', '1', '开发', 'dev', '开发权限的角色', '[1,2,3,4]');
INSERT INTO `base_sys_role` VALUES (3, '2023-08-04 13:00:11.324000', '2023-08-04 13:00:11.324000', '1', '测试', 'test', '测试权限的角色', 'null');
INSERT INTO `base_sys_role` VALUES (4, '2023-08-04 13:00:11.324000', '2023-08-04 13:00:11.324000', '1', '前端开发', 'frontend', '前端开发', 'null');
INSERT INTO `base_sys_role` VALUES (5, '2023-08-04 13:00:11.324000', '2023-08-04 13:00:11.324000', '1', '后端开发', 'backend', '后端开发', 'null');
COMMIT;

-- ----------------------------
-- Table structure for base_sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `base_sys_role_menu`;
CREATE TABLE `base_sys_role_menu` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `createTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  `updateTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
  `roleId` bigint NOT NULL COMMENT '角色ID',
  `menuId` bigint NOT NULL COMMENT '菜单ID',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `IDX_3641f81d4201c524a57ce2aa54` (`createTime`) USING BTREE,
  KEY `IDX_f860298298b26e7a697be36e5b` (`updateTime`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

BEGIN;
INSERT INTO `base_sys_role_menu` VALUES (1, '2023-08-04 13:00:11.324000', '2023-08-04 13:00:11.324000', '2', '1');
INSERT INTO `base_sys_role_menu` VALUES (2, '2023-08-04 13:00:11.324000', '2023-08-04 13:00:11.324000', '2', '2');
INSERT INTO `base_sys_role_menu` VALUES (3, '2023-08-04 13:00:11.324000', '2023-08-04 13:00:11.324000', '2', '3');
INSERT INTO `base_sys_role_menu` VALUES (4, '2023-08-04 13:00:11.324000', '2023-08-04 13:00:11.324000', '2', '4');
COMMIT;

-- ----------------------------
-- Table structure for base_sys_user
-- ----------------------------
DROP TABLE IF EXISTS `base_sys_user`;
CREATE TABLE `base_sys_user` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `createTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  `updateTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '姓名',
  `username` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码',
  `passwordV` int NOT NULL DEFAULT '1' COMMENT '密码版本, 作用是改完密码，让原来的token失效',
  `nickName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '昵称',
  `headImg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像',
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '手机',
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
  `status` tinyint NOT NULL DEFAULT '1' COMMENT '状态 0:禁用 1：启用',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
  `socketId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'socketId',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `IDX_469ad55973f5b98930f6ad627b` (`username`) USING BTREE,
  KEY `IDX_9ec6d7ac6337eafb070e4881a8` (`phone`) USING BTREE,
  KEY `IDX_ca8611d15a63d52aa4e292e46a` (`createTime`) USING BTREE,
  KEY `IDX_a0f2f19cee18445998ece93ddd` (`updateTime`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of base_sys_user
-- ----------------------------
BEGIN;
INSERT INTO `base_sys_user` VALUES (1, '2021-02-24 21:16:41.525157', '2023-03-08 15:11:51.000000', '超级管理员', 'admin', 'e10adc3949ba59abbe56e057f20f883e', 7, '管理员', 'https://show.cool-admin.com/api/public/uploads/20230308/c731b0cba84046268b10edbbcf36f948_315c243a448e1369fa145c5ea3f020da.gif', '18000000000', 'admin@qq.com', 1, '拥有最高权限的用户', NULL);
INSERT INTO `base_sys_user` VALUES (2, '2021-02-24 21:16:41.525157', '2023-03-08 15:11:51.000000', '张三', 'zs', 'e10adc3949ba59abbe56e057f20f883e', 7, '小三', 'https://show.cool-admin.com/api/public/uploads/20230308/c731b0cba84046268b10edbbcf36f948_315c243a448e1369fa145c5ea3f020da.gif', '18000000000', 'admin@qq.com', 1, '...', NULL);
COMMIT;

-- ----------------------------
-- Table structure for base_sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `base_sys_user_role`;
CREATE TABLE `base_sys_user_role` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `createTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间',
  `updateTime` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间',
  `userId` bigint NOT NULL COMMENT '用户ID',
  `roleId` bigint NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `IDX_fa9555e03e42fce748c9046b1c` (`createTime`) USING BTREE,
  KEY `IDX_3e36c0d2b1a4c659c6b4fc64b3` (`updateTime`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of base_sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `base_sys_user_role` VALUES (1, '2021-02-24 22:03:11.665805', '2021-02-24 22:03:11.665805', 1, 1);
INSERT INTO `base_sys_user_role` VALUES (2, '2021-02-24 22:03:11.665805', '2021-02-24 22:03:11.665805', 2, 2);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
